﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AgvDispatchSystem
{
    public interface IDriver:IAgvReadWrite
    {
        short DriverID { get; }
        string Name { get; }
        string ServerName { get; set; }//可以考虑增加一个附加参数，Sever只定义本机名
        bool IsClosed { get; }
        int TimeOut { get; set; }
        bool Connect();

        event IOErrorEventHandler OnError;
    }

    public class IOErrorEventArgs : EventArgs
    {
        public IOErrorEventArgs(string reson)
        {
            Reason = reson;
        }
        public string Reason;
    }

    public delegate void IOErrorEventHandler(object sender, IOErrorEventArgs e);
}
